package com.gitee.dynamicproxy.cglib;

import com.gitee.dynamicproxy.service.OrderService;
import com.gitee.dynamicproxy.service.impl.OrderServiceImpl;

/**
 * @author ming.yan-1
 * @version V1.0
 * @Title com.gitee.dynamicproxy.cglib
 * @Description
 * @date 2018/9/11  下午7:58
 */
public class Demo {

    public static void main(String[] args) {
//        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "/Users/yp-pd-7027/Downloads");
        CglibDemo cglibDemo = new CglibDemo();
        OrderService orderService = new OrderServiceImpl();
        OrderService dynamicOrderService = (OrderService) cglibDemo.instance(orderService);
        System.out.println("开始调用前");
        dynamicOrderService.creatOrder("12312");
        System.out.println("开始调用后");
    }
}
